FROM golang:1.21-bullseye AS builder
COPY . /pay
WORKDIR /pay
RUN go env -w GO111MODULE=on && \
    go env -w GOPROXY=https://goproxy.cn,direct && \
    make

FROM centos
COPY --from=builder /pay /pay
WORKDIR /pay
EXPOSE 80
CMD ["./payservice"]